# 添加 删除 根据姓名
#  查询学生人数

class StudentManage:
    #  类属性 : 学生人数
    student_count = 0

    def __init__(self,students = []):
        self.students = students

    def add_student(self):
        StudentManage.student_count += 1
        add_name = input('请输入添加学生姓名:')
        self.students.append(add_name)
        print(self.students)
        # print(res)

    def del_student(self):
        StudentManage.student_count -= 1
        del_name = input('请输入删除学生姓名:')
        for student in self.students:
            self.students.remove(del_name)
            print(self.students)
            # return self.students

        return None
    @classmethod
    def people_number(self):
        return StudentManage.student_count

    @staticmethod
    def show():
        print('''添加1
                删除2
                学生人数3''')

    def main(self):
        StudentManage.show()
        while 1:
            a = input('请输入指令:')
            if a == '1':
                self.add_student()
            elif a == '2':
                self.del_student()
            elif a == '3':
                self.people_number()
            else:
                print('无此指令')

s = StudentManage()
s.main()
